;;msf-abbrev
(require 'cc-mode)
;;(require 'tex-site)
;;(require 'latex)
(require 'sh-script)
;;(require 'shell)
;;(require 'tex) 
(setq-default abbrev-mode t)
(setq save-abbrevs nil)
;;(require 'latex)
(require 'msf-abbrev)
(setq msf-abbrev-root "~/emacs/mode-abbrevs")
(msf-abbrev-load)
(setq msf-abbrev-load-tree "~/emacs/mode-abbrevs")
;;(msf-abbrev-load-tree "~/emacs/mode-abbrevs")


;;(setq buffer-file-coding-system 'gb2312)




;;**************************************************************************
;;auto-load files what you edited last time
;;require nothing,this lisp is included by emacs
(load "desktop")
(desktop-load-default)
(desktop-read)
;M-x desktop-save,  M-x desktop-clear

;recent opened files
(require 'recentf)
(recentf-mode 1)

;buffer manager
(require 'ibuffer)
(global-set-key (kbd "C-x C-b") 'ibuffer)
;***************************************************************************************************************
;buffer manager
(require 'swbuff)
(global-set-key (kbd "C-,") 'swbuff-switch-to-previous-buffer)
(global-set-key (kbd "C-.") 'swbuff-switch-to-next-buffer)
(setq swbuff-exclude-buffer-regexps 
     '("^ " "\\*.*\\*"))

(setq swbuff-status-window-layout 'adjust)
(setq swbuff-clear-delay 100)
(setq swbuff-separator "|")
(setq swbuff-window-min-text-height 1)
;***************************************************************************************************************
;export the syntax highlighting buffers to html files
;(require 'htmlize)
;***************************************************************************************************************
;(load "dict.el")

;***************************************************************************************************************
;spell checking program,with aspell 0.60.3
(setq-default ispell-program-name "aspell")
(setq ispell-extra-args '("--lang=en_US"))
;load fly-spell automatically.
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(autoload 'flyspell-delay-command "flyspell" "Delay on command." t) (autoload 'tex-mode-flyspell-verify "flyspell" "" t) 
;hook flyspell-mode and outline-minor-mode to auctex.
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'outline-minor-mode)
;reftex
 (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
  (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
  (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
  (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
  (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
  (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
;***********************************************************************************************************


;(autoload 'table-insert "table" "WYGIWYS table editor")
